package com.yeheng.homework.service;

import com.yeheng.homework.entity.Dept;
import com.yeheng.homework.mapper.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @PackgeName: com.yeheng.homework.service
 * @ClassName: DeptSerivce
 * @Author: YH
 * Date: 2020/12/26 21:56
 * project name: homework
 * @Version:
 * @Description:
 */
@Service
public class DeptSerivce {

    @Autowired
    DeptMapper mapper;

    public List<Dept> findAll(){
        return mapper.findAll();
    }

    public boolean updateDept(Dept dept){
        return mapper.updateDept(dept);
    }

    public boolean delDid(Integer did){
        return mapper.delByDid(did);
    }

    public boolean addDept(Dept dept){
        return mapper.addDept(dept);
    }

    public boolean delMany(List<Integer> list){
        return mapper.delMany(list);
    }
}
